<template>
  <section>
    <el-form :model="fromData" status-icon :rules="fromData_rules" ref="fromDataRef" label-width="100px">
      <el-form-item label="公司名称" prop="companyName">
        <el-input v-model="fromData.companyName"></el-input>
      </el-form-item>
      <el-form-item label="负责人" prop="leader">
        <el-input v-model="fromData.leader"></el-input>
      </el-form-item>
      <el-form-item label="联系电话" prop="phone">
        <el-input v-model="fromData.phone"></el-input>
      </el-form-item>
      <el-form-item label="邮箱" prop="email">
        <el-input v-model="fromData.email"></el-input>
      </el-form-item>
      <el-form-item label="备注" prop="remark">
        <el-input type="textarea" v-model="fromData.remark"></el-input>
      </el-form-item>
    </el-form>
    <div></div>
  </section>
</template>

<script>
export default {
  props: {
    fromData: {},
  },
  data() {
    return {
      fromData_rules: {
        companyName: [{ required: true, message: '请输入公司名称', trigger: ['blur', 'change'] }],
        leader: [{ required: true, message: '请输入负责人名字', trigger: ['blur', 'change'] }],
      },
    }
  },
  methods: {
    validate() {
      let res_bool = false
      this.$refs.fromDataRef.validate(bool => {
        res_bool = bool
      })
      return res_bool
    },
    resetFields() {
      this.$refs.fromDataRef.resetFields()
    },
  },
}
</script>

<style>
</style>